﻿@model BrnMall.Web.StoreAdmin.Models.BuySendPromotionListModel
           
@section header{
    <title>买送促销列表</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/content/css/site.css"/>
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/showlist.js"></script>
    <script type="text/javascript" src="/admin_store/content/my97datepicker/WdatePicker.js"></script>
}
@section body{
    <h1 class="rightH1">
        买送促销 &gt;&gt; 促销列表
<div class="right">
<a href="@Url.Action("addbuysendpromotion")" class="menuBT"><img src="/admin_store/content/images/add.jpg"/>添加</a>
<div class="clear"></div>
</div>
        <div class="clear">
        </div>
    </h1>
    
    @using (Html.BeginForm())
    {
    
        <input type="hidden" value="@Model.SortColumn" id="sortColumn" name="sortColumn" />
        <input type="hidden" value="@Model.SortDirection" id="sortDirection" name="sortDirection" />
        <div class="dataListSearch">
            <table height="32">
                <tbody>
                    <tr>
                        <td width="35"><img id="searchImg" src="/admin_store/content/images/search1.gif" /></td>
                        <td>&nbsp;活动名称：</td>
                        <td width="180">@Html.TextBox("PromotionName", Model.PromotionName, new { height = "28", size = "30" })</td>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;活动时间：</td>
                        <td width="180">@Html.TextBox("PromotionTime", Model.PromotionTime, new { height = "28", size = "30", onfocus = "WdatePicker({el:'PromotionTime'})" })</td>
                        <td><input id="SearchProduct" name="SearchProduct" type="image" class="searchBut submit" src="/admin_store/content/images/s.jpg" /></td>
                    </tr>
                </tbody>
            </table>
        </div>
    <div class="dataList">
        <table width="100%">
            <thead>
                <tr>
                    <th width="40" align="center"><input type="checkbox" id="allSelect" /></th>
                    <th width="80" align="left">活动编号</th>
                    <th align="left">活动名称</th>
                    <th width="110" align="left">活动类型</th>
                    <th width="130" align="left">开始时间</th>
                    <th width="130" align="left">结束时间</th>
                    <th width="80" align="left">活动状态</th>
                    <th width="150" align="left">管理操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (DataRow row in Model.BuySendPromotionList.Rows)
                {
                    <tr>
                        <td align="center"><input type="checkbox" value="@row["pmid"]" selectItem="true" name="pmIdList"/></td>
                        <td>@row["pmid"]</td>
                        <td>@row["pname"]</td>
                        <td>
                            @{
                                if (row["type"].ToString() == "0")
                                {
                                    @:全场参加
                                }
                                else if (row["type"].ToString() == "1")
                                {
                                    @:部分商品参加
                                }
                                else
                                {
                                    @:部分商品不参加
                                }
                            }
                        </td>
                        <td>@row["starttime"]</td>
                        <td>@row["endtime"]</td>
                         <td>
                          @{
                                if (row["state"].ToString() == "0")
                                {
                                    @:暂停
                                }
                                else
                                {
                                    @:启动
                                }
                            }
                        </td>
                        <td>
                        @{
                            if (row["type"].ToString() != "0")
                            {
                                 @Html.ActionLink("[商品列表]", "buysendproductlist", new { pmId = row["pmid"] }, new { @class = "editOperate" })
                            }
                            }
                                @Html.ActionLink("[编辑]", "editbuysendpromotion", new { pmId = row["pmid"] }, new { @class = "editOperate" })
                                @Html.ActionLink("[删除]", "delbuysendpromotion", new { pmIdList = row["pmid"] }, new { @class = "deleteOperate" })
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>

                <div class="dataListEdit">
    <a href="#" delUrl="@Url.Action("delbuysendpromotion")" class="batch batchDel">批量删除</a>
            <div class="page">
                @Html.StoreAdminPager(Model.PageModel)
            </div>
        </div>
    }
}
